Computer technology continues to be improved for handling more useful and complex functions associated with specific applications. Despite the continual advances in the speed and power of computers, however, these applications of computer technology continue to demand even greater computing power. For this reason, an ever-present need exists for improving the performance of the computer software that controls how a computer operates.
Generally, the software that controls how the computer operates, in its most basic form, is referred to as the operating system of the computer. The operating system is essentially a set of software programs that manages the various hardware and software resources of the computer and handles the computer's interaction with users. For example, it is the operating system that creates the computer's prompts and screens on the monitor to interface with a user and that runs the computer's programs for the user. Furthermore, the operating system will allow a computer to interface with its hardware resources, such as a printer or a disk drive, or will allow a user to run other higher level software applications on the computer. The operating system, therefore, must be able to complete a large number of different functions to ensure that the computer, including its accessible hardware and software resources, functions properly and at a sufficient speed for the user.
Within the operating system of a computer, the various internal functions that are handled are referred to as tasks. These various tasks may be thought of, in the traditional sense, as jobs that the computer must do when it is properly running programs for a user. A process that accomplished a related series of such tasks is sometimes referred to as a thread. For example, a task might involve updating the contents of a file or writing a file to a storage device, such as a disk drive.
In the context of client-server applications, threads are used to facilitate communication between program parts executing on both the client and server computers. A thread executing on a client routinely prepares and sends data requests to a corresponding thread on the server. The server thread executes applicable code to accomplish the request and return it to the client thread. Ideally, the server thread will complete its task before the client thread (awaiting the task results) is timed-out. A timeout is an interrupt signal generated by a program or device that has waited a certain length of time for some input, but has not received it. An interrupt may include a synchronous event in software indicating a need for change in execution. Many programs perform timeouts so that the program does not sit idle waiting for input that may never come. Timeouts also may prevent looping (where the client computer ceaselessly waits for an input), which may cause an entire system to become unresponsive.
In a typical client-server environment, there are usually various timeouts associated with both sides. Timeouts can vary greatly depending on the product and/or protocol involved. However, the length of time before a timeout occurs usually relates to how long a thread is willing to wait for a response from whatever resource a request was sent to. This optimization is good for the client side, but even if a client times out, the server side will generally continue to process the request until completion, and/or server thread hits it's own, separate timeout. This means that resources that could otherwise be freed up are still processing a request that, generally speaking, the original caller no longer cares about.
An example involving Java Servlets illustrates the concept of timing-out. Java Servlets are used in conjunction with web browsers. The web browser acts as the client. The servlet resides on the server side. When an event occurs on a web page, such as clicking on a submit button, user-entered data on the page, such as information to make an online purchase of goods, may be sent to the servlet for processing. The servlet then receives that data and takes appropriate actions, such as verifying the credit card number and checking inventory to make sure the purchase can be fulfilled.
If the server takes a lengthy period of time to process that data, the web browser may timeout and show an error message to the effect that the page being requested cannot be obtained, or that communication was lost with the web server. The server will eventually finish processing the user's data, but because of the timeout, the web page that the server returns to the client browser (after the data has been processed) will go undisplayed.
Even if the data is able to be processed within the timeout period enforced by the browser, the processing may still be lengthy and leave the user wondering if the process has been timed-out and lost. Without a monitoring system that uses words and/or a pictorial to indicate the progress of the data processing to the user, the user would only see an hourglass while the mouse is hovering over the browser. This has been a source of frustration for users encountering this event.
What is consequently needed is an improved manner of handling timeouts in a client-server environment.